package com.mew.prop.controller;

import com.mew.common.rest.mail.MailDetailInfoResponseMessage;
import com.mew.common.rest.mail.MailResponseMessage;
import com.mew.prop.service.PropService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 邮件
 * @author dylin
 * @create 2021/4/2
 */
@Controller
@RequestMapping(value = "/prop")
public class PropController {
    @Autowired
    private PropService propService;

    /**
     * 获取道具数量
     */
    @PostMapping("/number")
    @ResponseBody
    public long getPropNumber(@RequestParam("userId") long userId, @RequestParam("propType") int propType){
        return propService.getPropNumber(userId,propType);
    }
}
